﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Web.Mvc;

namespace SIG.InputModel.DTO
{
    public class PagePageMetaDTO
    {
        public int Id { get; set; }
        [Display(Name = "标题", Prompt = "标题")]
        [Required(ErrorMessage = "请输入标题")]
        public string Title { get; set; }

        [Display(Name = "内容", Prompt = "内容")]      
        [AllowHtml]
        public string Body { get; set; }

        [Display(Name = "路径名称", Prompt = "路径名称")]
        [Required(ErrorMessage = "请输入路径名称")]
        [RegularExpression(@"^[a-zA-Z]+$", ErrorMessage = "只限英文字母")]
        [Remote("IsPathNameUnique", "Page", AdditionalFields = "Id", ErrorMessage = "路径名称{0}已经被使用")]
        public string PathName { get; set; }


        [Display(Name = "查看")]
        public int? ViewCount { get; set; }
        [Display(Name = "显示", Prompt = "显示")]
        public bool Active { get; set; }

        [Display(Name = "关键字", Prompt = "关键字")]
        public string Keywords { get; set; }

        [Display(Name = "SEO描述", Prompt = "SEO描述")]
        public string Description { get; set; }

        [Display(Name = "创建日期")]
        [ScaffoldColumn(false)]
        public DateTime CreatedDate { get; set; }

        [Display(Name = "创建者")]
        [MaxLength(256)]
        [ScaffoldColumn(false)]
        public string CreatedBy { get; set; }

        [Display(Name = "最后修改时间")]
        [ScaffoldColumn(false)]
        public DateTime UpdatedDate { get; set; }
        [Display(Name = "最后修改者")]
        [MaxLength(256)]
        [ScaffoldColumn(false)]
        public string UpdatedBy { get; set; }
    }
}
